3.1.78 \(\int x^2 (a+b \log (c x^n))^2 \log (d (e+f x)^m) \, dx\) [78]

3.1.78.1 Optimal result
3.1.78.2 Mathematica [A] (verified)
3.1.78.3 Rubi [A] (verified)
3.1.78.4 Maple [C] (warning: unable to verify)
3.1.78.5 Fricas [F]
3.1.78.6 Sympy [F(-1)]
3.1.78.7 Maxima [F]
3.1.78.8 Giac [F]
3.1.78.9 Mupad [F(-1)]

3.1.78.1 Optimal result

Integrand size = 26, antiderivative size = 452 \[ \int x^2 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right ) \, dx=\frac {8 a b e^2 m n x}{9 f^2}-\frac {26 b^2 e^2 m n^2 x}{27 f^2}+\frac {19 b^2 e m n^2 x^2}{108 f}-\frac {2}{27} b^2 m n^2 x^3+\frac {8 b^2 e^2 m n x \log \left (c x^n\right )}{9 f^2}-\frac {5 b e m n x^2 \left (a+b \log \left (c x^n\right )\right )}{18 f}+\frac {4}{27} b m n x^3 \left (a+b \log \left (c x^n\right )\right )-\frac {e^2 m x \left (a+b \log \left (c x^n\right )\right )^2}{3 f^2}+\frac {e m x^2 \left (a+b \log \left (c x^n\right )\right )^2}{6 f}-\frac {1}{9} m x^3 \left (a+b \log \left (c x^n\right )\right )^2+\frac {2 b^2 e^3 m n^2 \log (e+f x)}{27 f^3}+\frac {2}{27} b^2 n^2 x^3 \log \left (d (e+f x)^m\right )-\frac {2}{9} b n x^3 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )+\frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )-\frac {2 b e^3 m n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {f x}{e}\right )}{9 f^3}+\frac {e^3 m \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {f x}{e}\right )}{3 f^3}-\frac {2 b^2 e^3 m n^2 \operatorname {PolyLog}\left (2,-\frac {f x}{e}\right )}{9 f^3}+\frac {2 b e^3 m n \left (a+b \log \left (c x^n\right )\right ) \operatorname {PolyLog}\left (2,-\frac {f x}{e}\right )}{3 f^3}-\frac {2 b^2 e^3 m n^2 \operatorname {PolyLog}\left (3,-\frac {f x}{e}\right )}{3 f^3} \]

output
8/9*a*b*e^2*m*n*x/f^2-26/27*b^2*e^2*m*n^2*x/f^2+19/108*b^2*e*m*n^2*x^2/f-2 
/27*b^2*m*n^2*x^3+8/9*b^2*e^2*m*n*x*ln(c*x^n)/f^2-5/18*b*e*m*n*x^2*(a+b*ln 
(c*x^n))/f+4/27*b*m*n*x^3*(a+b*ln(c*x^n))-1/3*e^2*m*x*(a+b*ln(c*x^n))^2/f^ 
2+1/6*e*m*x^2*(a+b*ln(c*x^n))^2/f-1/9*m*x^3*(a+b*ln(c*x^n))^2+2/27*b^2*e^3 
*m*n^2*ln(f*x+e)/f^3+2/27*b^2*n^2*x^3*ln(d*(f*x+e)^m)-2/9*b*n*x^3*(a+b*ln( 
c*x^n))*ln(d*(f*x+e)^m)+1/3*x^3*(a+b*ln(c*x^n))^2*ln(d*(f*x+e)^m)-2/9*b*e^ 
3*m*n*(a+b*ln(c*x^n))*ln(1+f*x/e)/f^3+1/3*e^3*m*(a+b*ln(c*x^n))^2*ln(1+f*x 
/e)/f^3-2/9*b^2*e^3*m*n^2*polylog(2,-f*x/e)/f^3+2/3*b*e^3*m*n*(a+b*ln(c*x^ 
n))*polylog(2,-f*x/e)/f^3-2/3*b^2*e^3*m*n^2*polylog(3,-f*x/e)/f^3
 
3.1.78.2 Mathematica [A] (verified)

Time = 0.21 (sec) , antiderivative size = 788, normalized size of antiderivative = 1.74 \[ \int x^2 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right ) \, dx=\frac {-36 a^2 e^2 f m x+96 a b e^2 f m n x-104 b^2 e^2 f m n^2 x+18 a^2 e f^2 m x^2-30 a b e f^2 m n x^2+19 b^2 e f^2 m n^2 x^2-12 a^2 f^3 m x^3+16 a b f^3 m n x^3-8 b^2 f^3 m n^2 x^3-72 a b e^2 f m x \log \left (c x^n\right )+96 b^2 e^2 f m n x \log \left (c x^n\right )+36 a b e f^2 m x^2 \log \left (c x^n\right )-30 b^2 e f^2 m n x^2 \log \left (c x^n\right )-24 a b f^3 m x^3 \log \left (c x^n\right )+16 b^2 f^3 m n x^3 \log \left (c x^n\right )-36 b^2 e^2 f m x \log ^2\left (c x^n\right )+18 b^2 e f^2 m x^2 \log ^2\left (c x^n\right )-12 b^2 f^3 m x^3 \log ^2\left (c x^n\right )+36 a^2 e^3 m \log (e+f x)-24 a b e^3 m n \log (e+f x)+8 b^2 e^3 m n^2 \log (e+f x)-72 a b e^3 m n \log (x) \log (e+f x)+24 b^2 e^3 m n^2 \log (x) \log (e+f x)+36 b^2 e^3 m n^2 \log ^2(x) \log (e+f x)+72 a b e^3 m \log \left (c x^n\right ) \log (e+f x)-24 b^2 e^3 m n \log \left (c x^n\right ) \log (e+f x)-72 b^2 e^3 m n \log (x) \log \left (c x^n\right ) \log (e+f x)+36 b^2 e^3 m \log ^2\left (c x^n\right ) \log (e+f x)+36 a^2 f^3 x^3 \log \left (d (e+f x)^m\right )-24 a b f^3 n x^3 \log \left (d (e+f x)^m\right )+8 b^2 f^3 n^2 x^3 \log \left (d (e+f x)^m\right )+72 a b f^3 x^3 \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )-24 b^2 f^3 n x^3 \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )+36 b^2 f^3 x^3 \log ^2\left (c x^n\right ) \log \left (d (e+f x)^m\right )+72 a b e^3 m n \log (x) \log \left (1+\frac {f x}{e}\right )-24 b^2 e^3 m n^2 \log (x) \log \left (1+\frac {f x}{e}\right )-36 b^2 e^3 m n^2 \log ^2(x) \log \left (1+\frac {f x}{e}\right )+72 b^2 e^3 m n \log (x) \log \left (c x^n\right ) \log \left (1+\frac {f x}{e}\right )+24 b e^3 m n \left (3 a-b n+3 b \log \left (c x^n\right )\right ) \operatorname {PolyLog}\left (2,-\frac {f x}{e}\right )-72 b^2 e^3 m n^2 \operatorname {PolyLog}\left (3,-\frac {f x}{e}\right )}{108 f^3} \]

input
Integrate[x^2*(a + b*Log[c*x^n])^2*Log[d*(e + f*x)^m],x]
 
output
(-36*a^2*e^2*f*m*x + 96*a*b*e^2*f*m*n*x - 104*b^2*e^2*f*m*n^2*x + 18*a^2*e 
*f^2*m*x^2 - 30*a*b*e*f^2*m*n*x^2 + 19*b^2*e*f^2*m*n^2*x^2 - 12*a^2*f^3*m* 
x^3 + 16*a*b*f^3*m*n*x^3 - 8*b^2*f^3*m*n^2*x^3 - 72*a*b*e^2*f*m*x*Log[c*x^ 
n] + 96*b^2*e^2*f*m*n*x*Log[c*x^n] + 36*a*b*e*f^2*m*x^2*Log[c*x^n] - 30*b^ 
2*e*f^2*m*n*x^2*Log[c*x^n] - 24*a*b*f^3*m*x^3*Log[c*x^n] + 16*b^2*f^3*m*n* 
x^3*Log[c*x^n] - 36*b^2*e^2*f*m*x*Log[c*x^n]^2 + 18*b^2*e*f^2*m*x^2*Log[c* 
x^n]^2 - 12*b^2*f^3*m*x^3*Log[c*x^n]^2 + 36*a^2*e^3*m*Log[e + f*x] - 24*a* 
b*e^3*m*n*Log[e + f*x] + 8*b^2*e^3*m*n^2*Log[e + f*x] - 72*a*b*e^3*m*n*Log 
[x]*Log[e + f*x] + 24*b^2*e^3*m*n^2*Log[x]*Log[e + f*x] + 36*b^2*e^3*m*n^2 
*Log[x]^2*Log[e + f*x] + 72*a*b*e^3*m*Log[c*x^n]*Log[e + f*x] - 24*b^2*e^3 
*m*n*Log[c*x^n]*Log[e + f*x] - 72*b^2*e^3*m*n*Log[x]*Log[c*x^n]*Log[e + f* 
x] + 36*b^2*e^3*m*Log[c*x^n]^2*Log[e + f*x] + 36*a^2*f^3*x^3*Log[d*(e + f* 
x)^m] - 24*a*b*f^3*n*x^3*Log[d*(e + f*x)^m] + 8*b^2*f^3*n^2*x^3*Log[d*(e + 
 f*x)^m] + 72*a*b*f^3*x^3*Log[c*x^n]*Log[d*(e + f*x)^m] - 24*b^2*f^3*n*x^3 
*Log[c*x^n]*Log[d*(e + f*x)^m] + 36*b^2*f^3*x^3*Log[c*x^n]^2*Log[d*(e + f* 
x)^m] + 72*a*b*e^3*m*n*Log[x]*Log[1 + (f*x)/e] - 24*b^2*e^3*m*n^2*Log[x]*L 
og[1 + (f*x)/e] - 36*b^2*e^3*m*n^2*Log[x]^2*Log[1 + (f*x)/e] + 72*b^2*e^3* 
m*n*Log[x]*Log[c*x^n]*Log[1 + (f*x)/e] + 24*b*e^3*m*n*(3*a - b*n + 3*b*Log 
[c*x^n])*PolyLog[2, -((f*x)/e)] - 72*b^2*e^3*m*n^2*PolyLog[3, -((f*x)/e)]) 
/(108*f^3)
 
3.1.78.3 Rubi [A] (verified)

Time = 0.85 (sec) , antiderivative size = 450, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {2825, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int x^2 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right ) \, dx\)

\(\Big \downarrow \) 2825

\(\displaystyle -f m \int \left (\frac {\left (a+b \log \left (c x^n\right )\right )^2 x^3}{3 (e+f x)}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) x^3}{9 (e+f x)}+\frac {2 b^2 n^2 x^3}{27 (e+f x)}\right )dx+\frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )-\frac {2}{9} b n x^3 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )+\frac {2}{27} b^2 n^2 x^3 \log \left (d (e+f x)^m\right )\)

\(\Big \downarrow \) 2009

\(\displaystyle -f m \left (-\frac {2 b e^3 n \operatorname {PolyLog}\left (2,-\frac {f x}{e}\right ) \left (a+b \log \left (c x^n\right )\right )}{3 f^4}-\frac {e^3 \log \left (\frac {f x}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{3 f^4}+\frac {2 b e^3 n \log \left (\frac {f x}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{9 f^4}+\frac {e^2 x \left (a+b \log \left (c x^n\right )\right )^2}{3 f^3}-\frac {e x^2 \left (a+b \log \left (c x^n\right )\right )^2}{6 f^2}+\frac {5 b e n x^2 \left (a+b \log \left (c x^n\right )\right )}{18 f^2}+\frac {x^3 \left (a+b \log \left (c x^n\right )\right )^2}{9 f}-\frac {4 b n x^3 \left (a+b \log \left (c x^n\right )\right )}{27 f}-\frac {8 a b e^2 n x}{9 f^3}-\frac {8 b^2 e^2 n x \log \left (c x^n\right )}{9 f^3}+\frac {2 b^2 e^3 n^2 \operatorname {PolyLog}\left (2,-\frac {f x}{e}\right )}{9 f^4}+\frac {2 b^2 e^3 n^2 \operatorname {PolyLog}\left (3,-\frac {f x}{e}\right )}{3 f^4}-\frac {2 b^2 e^3 n^2 \log (e+f x)}{27 f^4}+\frac {26 b^2 e^2 n^2 x}{27 f^3}-\frac {19 b^2 e n^2 x^2}{108 f^2}+\frac {2 b^2 n^2 x^3}{27 f}\right )+\frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )-\frac {2}{9} b n x^3 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )+\frac {2}{27} b^2 n^2 x^3 \log \left (d (e+f x)^m\right )\)

input
Int[x^2*(a + b*Log[c*x^n])^2*Log[d*(e + f*x)^m],x]
 
output
(2*b^2*n^2*x^3*Log[d*(e + f*x)^m])/27 - (2*b*n*x^3*(a + b*Log[c*x^n])*Log[ 
d*(e + f*x)^m])/9 + (x^3*(a + b*Log[c*x^n])^2*Log[d*(e + f*x)^m])/3 - f*m* 
((-8*a*b*e^2*n*x)/(9*f^3) + (26*b^2*e^2*n^2*x)/(27*f^3) - (19*b^2*e*n^2*x^ 
2)/(108*f^2) + (2*b^2*n^2*x^3)/(27*f) - (8*b^2*e^2*n*x*Log[c*x^n])/(9*f^3) 
 + (5*b*e*n*x^2*(a + b*Log[c*x^n]))/(18*f^2) - (4*b*n*x^3*(a + b*Log[c*x^n 
]))/(27*f) + (e^2*x*(a + b*Log[c*x^n])^2)/(3*f^3) - (e*x^2*(a + b*Log[c*x^ 
n])^2)/(6*f^2) + (x^3*(a + b*Log[c*x^n])^2)/(9*f) - (2*b^2*e^3*n^2*Log[e + 
 f*x])/(27*f^4) + (2*b*e^3*n*(a + b*Log[c*x^n])*Log[1 + (f*x)/e])/(9*f^4) 
- (e^3*(a + b*Log[c*x^n])^2*Log[1 + (f*x)/e])/(3*f^4) + (2*b^2*e^3*n^2*Pol 
yLog[2, -((f*x)/e)])/(9*f^4) - (2*b*e^3*n*(a + b*Log[c*x^n])*PolyLog[2, -( 
(f*x)/e)])/(3*f^4) + (2*b^2*e^3*n^2*PolyLog[3, -((f*x)/e)])/(3*f^4))
 

3.1.78.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2825
Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_. 
)]*(b_.))^(p_.)*((g_.)*(x_))^(q_.), x_Symbol] :> With[{u = IntHide[(g*x)^q* 
(a + b*Log[c*x^n])^p, x]}, Simp[Log[d*(e + f*x^m)^r]   u, x] - Simp[f*m*r 
 Int[x^(m - 1)/(e + f*x^m)   u, x], x]] /; FreeQ[{a, b, c, d, e, f, g, r, m 
, n, q}, x] && IGtQ[p, 0] && RationalQ[m] && RationalQ[q]
 
3.1.78.4 Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 169.26 (sec) , antiderivative size = 5917, normalized size of antiderivative = 13.09

method result size
risch \(\text {Expression too large to display}\) \(5917\)

input
int(x^2*(a+b*ln(c*x^n))^2*ln(d*(f*x+e)^m),x,method=_RETURNVERBOSE)
 
output
result too large to display
 
3.1.78.5 Fricas [F]

\[ \int x^2 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right ) \, dx=\int { {\left (b \log \left (c x^{n}\right ) + a\right )}^{2} x^{2} \log \left ({\left (f x + e\right )}^{m} d\right ) \,d x } \]

input
integrate(x^2*(a+b*log(c*x^n))^2*log(d*(f*x+e)^m),x, algorithm="fricas")
 
output
integral((b^2*x^2*log(c*x^n)^2 + 2*a*b*x^2*log(c*x^n) + a^2*x^2)*log((f*x 
+ e)^m*d), x)
 
3.1.78.6 Sympy [F(-1)]

Timed out. \[ \int x^2 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right ) \, dx=\text {Timed out} \]

input
integrate(x**2*(a+b*ln(c*x**n))**2*ln(d*(f*x+e)**m),x)
 
output
Timed out
 
3.1.78.7 Maxima [F]

\[ \int x^2 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right ) \, dx=\int { {\left (b \log \left (c x^{n}\right ) + a\right )}^{2} x^{2} \log \left ({\left (f x + e\right )}^{m} d\right ) \,d x } \]

input
integrate(x^2*(a+b*log(c*x^n))^2*log(d*(f*x+e)^m),x, algorithm="maxima")
 
output
1/54*(3*(3*b^2*e*f^2*m*x^2 - 6*b^2*e^2*f*m*x + 6*b^2*e^3*m*log(f*x + e) - 
2*(f^3*m - 3*f^3*log(d))*b^2*x^3)*log(x^n)^2 + 2*(9*b^2*f^3*x^3*log(x^n)^2 
 + 6*(3*a*b*f^3 - (f^3*n - 3*f^3*log(c))*b^2)*x^3*log(x^n) + (9*a^2*f^3 - 
6*(f^3*n - 3*f^3*log(c))*a*b + (2*f^3*n^2 - 6*f^3*n*log(c) + 9*f^3*log(c)^ 
2)*b^2)*x^3)*log((f*x + e)^m))/f^3 - integrate(1/27*((9*(f^4*m - 3*f^4*log 
(d))*a^2 - 6*(f^4*m*n - 3*(f^4*m - 3*f^4*log(d))*log(c))*a*b + (2*f^4*m*n^ 
2 - 6*f^4*m*n*log(c) + 9*(f^4*m - 3*f^4*log(d))*log(c)^2)*b^2)*x^4 - 27*(b 
^2*e*f^3*log(c)^2*log(d) + 2*a*b*e*f^3*log(c)*log(d) + a^2*e*f^3*log(d))*x 
^3 - 3*(3*b^2*e^2*f^2*m*n*x^2 + 6*b^2*e^3*f*m*n*x - 2*(3*(f^4*m - 3*f^4*lo 
g(d))*a*b - (2*f^4*m*n - 3*f^4*n*log(d) - 3*(f^4*m - 3*f^4*log(d))*log(c)) 
*b^2)*x^4 + (18*a*b*e*f^3*log(d) - (e*f^3*m*n + 6*e*f^3*n*log(d) - 18*e*f^ 
3*log(c)*log(d))*b^2)*x^3 - 6*(b^2*e^3*f*m*n*x + b^2*e^4*m*n)*log(f*x + e) 
)*log(x^n))/(f^4*x^2 + e*f^3*x), x)
 
3.1.78.8 Giac [F]

\[ \int x^2 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right ) \, dx=\int { {\left (b \log \left (c x^{n}\right ) + a\right )}^{2} x^{2} \log \left ({\left (f x + e\right )}^{m} d\right ) \,d x } \]

input
integrate(x^2*(a+b*log(c*x^n))^2*log(d*(f*x+e)^m),x, algorithm="giac")
 
output
integrate((b*log(c*x^n) + a)^2*x^2*log((f*x + e)^m*d), x)
 
3.1.78.9 Mupad [F(-1)]

Timed out. \[ \int x^2 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right ) \, dx=\int x^2\,\ln \left (d\,{\left (e+f\,x\right )}^m\right )\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2 \,d x \]

input
int(x^2*log(d*(e + f*x)^m)*(a + b*log(c*x^n))^2,x)
 
output
int(x^2*log(d*(e + f*x)^m)*(a + b*log(c*x^n))^2, x)